<%-- 
    Document   : ExitoListVotosNick
    Created on : 12/05/2010, 07:48:03 PM
    Author     : dario
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">

<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>
<%@ page import = " com.ejb.VotosFachadaRemote, java.util.Iterator, java.util.Vector, java.util.List" %>

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title><bean:message key="listadoVotosNick.title"/></title>
         <style type="text/css">
          body {
                background-color: #000000;
                font-family: Arial, Helvetica, sans-serif, "Arial Narrow";
                font-weight: bold;
                color: #FFFFFF;
                font-size: 14px;
        }
        </style>
    </head>
    <body>
        <% if (request.getSession().getAttribute("Tipo")!="Admin")
         {
      %>
         <jsp:forward page="Welcome.do"/>
      <%
          }
      %>
       <jsp:include page="Cabezal.html"/>
       <br>
       <jsp:useBean id="listVotosNick" scope="session" class="com.actions.ListVotosNick" />

    <table width="100%">
           <tr>
                 <td align="center" width="30%" valign="top">
                     <jsp:include page="AdministradorMenu.jsp"/>
                 </td>
                 <td align="center">

                     <h1><bean:message key="listadoVotosNick.title"/></h1>
                     <br>
                <table  width="100%" style="color:black; font-size:18px">
                <tr style="color:white; background-image:url(imagenes/botonnegro.jpg)">
                <td>
                    <b>ID</b>
                </td>
                <td>
                    <b>Intérprete</b>
                </td>
                <td align="center">
                    <b>Canción</b>
                </td>
            </tr>
        <%
        Long aidi = (Long)request.getSession().getAttribute("ID");
        int largo = listVotosNick.obtenerLista(aidi);

         if (largo==0){
       %>
        <h2> <font color="gray"> EL NICK SOLICITADO NO TIENE VOTOS </font> </h2>
       <%

       }
       else{

       for (int i=0; i<largo; i++)
        {
             if (i%2==0)
               {
                 %>
           <tr style="background-image:url(imagenes/fondo1.jpg)" >
                 <%
               }
                else
                {
                 %>
           <tr style="background-image:url(imagenes/botonrojo.jpg)">
                 <%
                }
                 %>

             <td>
                <%= listVotosNick.darPosicion(i,0) %>
            </td>
            <td>
                 <%= listVotosNick.darPosicion(i,1) %>
            </td>
            <td>
                 <%= listVotosNick.darPosicion(i,2) %>
            </td>
         </tr>
        <%
        }
       }
        %>
        </table>
               </td>
            </tr>
        </table>

               <jsp:include page="Pie.html"/>
    </body>
</html>
